<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <title>${user.nickName} 的投票记录</title>
        <@_includePlace path="/8ddab9ba-a8aa-4745-86c6-66bf1c2c976c.html"/> <#-- header -->
    </head>
    <body>
        <@_includePlace path="/c32a4f4a-ff5d-49cf-bb59-5d9784539174.html"/> <#-- 导航 -->

        <div class="banner-l3 position-relative d-flex align-items-center justify-content-center" style="background:#22407c url(${site.sitePath}assets/img/banner-l3-bg-1.png) 50% 50% no-repeat;">
            <div class="container text-center position-relative py-3 py-md-4 text-white">
                <div class="breadcrumbs fs-7 text-white d-inline-flex align-items-center text-opacity-50">
                    <a href="${site.sitePath}">首页</a>
                    &gt; <a href="${site.dynamicPath}userVoteList.html?id=${user.id}" data-id="survey">${user.nickName} 的投票记录</a>
                </div>
            </div>
        </div>
        <div class="container">
            <@import path="/ftl/tools.ftl" namespace="t"/><#-- 工具 -->
            <div class="comment">
                <h3 class="mt-5">${user.nickName}的投票记录</h3>
                <@_userVoteList userId=user.id pageIndex=pageIndex pageSize=10>
                <ul class="article-list">
                    <#list page.list as a>
						<@t.merge 'voteIds' a.id.voteId!/>
						<@t.merge 'itemIds' a.itemId!/>
                    </#list>
                    <@_vote ids=t.voteIds! ><#assign voteMap=map!/></@_vote>
                    <@_voteItem ids=t.itemIds! ><#assign voteItemMap=map!/></@_voteItem>
                    <#list page.list as a>
                    <li class="card py-2 mb-2">
                        <p> 
							<a href="${site.dynamicPath}vote.html?id=${a.id.voteId}" target="_blank">${voteMap[a.id.voteId?string].title}</a>
							<span class="float-end text-secondary">${a.createDate?date}</span></p>
                        <p>
							<label class="text-secondary">投给了:</label> ${voteItemMap[a.itemId?string].title}
						</p>
                    </li>
                    <#else>
                    <li class="card py-2 mb-2"><p>没有数据</p></li>
                    </#list>
                </ul>
                <ul class="pagination mt-5 overflow-auto pb-3">
                    <#assign
					url='userVoteList.html'
					start=1
					end=page.totalPage
					/>
					<#if (page.pageIndex-5) gt start>
					<#assign start=page.pageIndex-4/>
					</#if>
					<#if (page.pageIndex+5) lt end>
					<#assign end=page.pageIndex+4/>
					</#if>
					<li class="page-item">
						<a class="page-link" href="${getPage(url,page.prePage,'pageIndex')}" aria-label="Previous">
							<span aria-hidden="true">«</span>
						</a>
					</li>
					<#if start gt 1>
					<li class="page-item"><a class="page-link" href="${getPage(url,1,'pageIndex')}">1</a></li>
					<li class="page-item"><span>...</span></li>
					</#if>
					<#list start..end as n>
					<li class="page-item<#if n=page.pageIndex> active</#if>"><a class="page-link" href="${getPage(url,n,'pageIndex')}">${n}</a></li>
					</#list>
					<#if end lt page.totalPage>
					<li class="page-item"><span>...</span></li>
					<li class="page-item"><a class="page-link" href="${getPage(url,page.totalPage,'pageIndex')}">${page.totalPage}</a></li>
					</#if>
					<li class="page-item">
						<a class="page-link" href="${getPage(url,page.nextPage,'pageIndex')}" aria-label="Next">
							<span aria-hidden="true">»</span>
						</a>
					</li>
                </ul>
                </@_userVoteList>
            </div>
        </div>
        <@_includePlace path="/7f8bacb5-30ca-4641-b66f-987d447b1a85.html"/> <#-- footer -->
    </body>
</html>